package com.esri.core.tasks.geodatabase;

import com.esri.core.internal.util.d;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class GeodatabaseTaskResult {
    private String _code = null;
    private String _message = null;
    private String _details = null;
    private boolean _succeeded = false;

    public static GeodatabaseTaskResult fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser == null || !d.c(jsonParser)) {
            return null;
        }
        GeodatabaseTaskResult geodatabaseTaskResult = new GeodatabaseTaskResult();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("error".equals(currentName)) {
                while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                    if ("message".equals(currentName)) {
                        geodatabaseTaskResult._message = jsonParser.getText();
                    } else if ("details".equals(currentName)) {
                        geodatabaseTaskResult._details = jsonParser.getText();
                    } else if ("code".equals(currentName)) {
                        geodatabaseTaskResult._code = jsonParser.getText();
                    } else {
                        jsonParser.skipChildren();
                    }
                }
            } else if ("success".equals(currentName)) {
                geodatabaseTaskResult._succeeded = jsonParser.getValueAsBoolean();
            } else {
                jsonParser.skipChildren();
            }
        }
        return geodatabaseTaskResult;
    }

    public String getCode() {
        return this._code;
    }

    public String getMessage() {
        return this._message;
    }

    public String getDetails() {
        return this._details;
    }

    public boolean succeeded() {
        return this._succeeded;
    }
}
